package rfp1;

import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.Select;

import java.io.FileOutputStream;
import java.io.FileInputStream;
import java.io.File;

public class r1 {

	WebDriver driver = new FirefoxDriver();
	String URL="http://www.redfin.com/";
	String vzip = "91367";
	String vMin ="$100,000";
	String vMax ="$400,000";
	String vbeds="3+";
	String vbaths="2+";
	
	
	@Test
	public void Attest() throws Exception{	
		
		driver.navigate().to(URL);
		driver.findElement(By.xpath("//input[@class='dijitReset dijitInputInner']")).sendKeys(vzip);
		//driver.findElement(By.xpath("//select[@title='Minimum price']")).sendKeys(arg0);
		Select mys= new Select(driver.findElement(By.xpath("//select[@title='Minimum price']")));
		mys.selectByVisibleText(vMin);
		mys= new Select(driver.findElement(By.xpath("//select[@title='Maximum price']")));
		mys.selectByVisibleText(vMax);
		mys = new Select(driver.findElement(By.xpath("//select[@name='num_beds']")));
		mys.selectByVisibleText(vbeds);
		mys = new Select(driver.findElement(By.xpath("//select[@name='num_baths']")));
		mys.selectByVisibleText(vbeds);
		driver.findElement(By.xpath("//input[@type ='submit']"));
		Thread.sleep(5000);
	}
	
	
}
